import request from '@/utils/request'
import { parseStrEmpty } from "@/utils/ruoyi";

// 查询办案中心 申请 列表/dev-api/bussiness/Apply/list
export function BAApplyList(data,query) {
  return request({
    url: '/bussiness/Apply/list',
    method: 'post',
    params: query,
    data: data,
    isEncrypt: false
  })
}
// 查询用警申请信息详情
export function getBAApplyInfo(query) {
  return request({
    url: '/bussiness/Apply/info?id=' + query,
    method: 'get',
    // params: query
  })
}

// 办案中心使用申请-新增   ​/dev-api​/bussiness​/BAApply​/add

export function createBAApply(data) {
  return request({
    url: '/bussiness/Apply/add',
    method: 'post',
    data: data,
    isEncrypt: false
  })
}

// 修改用警申请
export function editBAApply(data) {
  return request({
    url: '/bussiness/Apply/edit',
    method: 'post',
    data: data,
    isEncrypt: false
  })
}

// 删除申请  /dev-api/bussiness/Apply/remove
export function deleteBAApply(id) {
  return request({
    url: '/bussiness/Apply/remove?ids=' + id,
    method: 'post',
    isEncrypt: false
  })
}


//法警负责人-审批列表 /dev-api/bussiness/Apply/depList
export function BAApplydepList(data,query) {
  return request({
    url: '/bussiness/Apply/depList',
    method: 'post',
    isEncrypt: false,
    params: query,
    data: data,
  })
}

//法警负责人-提交分管领导   /dev-api/bussiness/Apply/depConfirm
export function BAApplyFjConfirm(data) {
  return request({
    url: '/bussiness/Apply/depConfirm',
    method: 'post',
    isEncrypt: false,
    data: data,
  })
}
//法警负责人-提交分管领导   /dev-api/bussiness/Apply/forLeaderConfirm
export function BAApplyforLeader(data) {
  return request({
    url: '/bussiness/Apply/forLeaderConfirm',
    method: 'post',
    isEncrypt: false,
    data: data,
  })
}

//法警负责人回退 /dev-api/bussiness/Apply/cancelDepConfirm
export function BAApplycancel(data) {
  return request({
    url: '/bussiness/Apply/cancelDepConfirm',
    method: 'post',
    isEncrypt: false,
    data: data,
  })
}
//法警负责人取消 /dev-api/bussiness/Apply/applyCancel
export function BAApplyapplyCancel(data) {
  return request({
    url: '/bussiness/Apply/applyCancel',
    method: 'post',
    isEncrypt: false,
    data: data,
  })
}


//分管领导-审批列表/dev-api/bussiness/Apply/leaderList
export function BAApplyleaderList(data) {
  return request({
    url: '/bussiness/Apply/leaderList',
    method: 'post',
    isEncrypt: false,
    data: data
  })
}


//分管领导-确认审批  /dev-api/bussiness/Apply/leaderConfirm
export function BAApplyleaderConfirm(data) {
  return request({
    url: '/bussiness/Apply/leaderConfirm',
    method: 'post',
    isEncrypt: false,
    data: data
  })
}

//分管领导-回退  /dev-api/bussiness/Apply/cancelLeaderConfirm
export function BAApplycancelLeaderConfirm(data) {
  return request({
    url: '/bussiness/Apply/cancelLeaderConfirm',
    method: 'post',
    isEncrypt: false,
    data: data
  })
}

// 办案中心管理列表   /dev-api/bussiness/Apply/policeAreaManageList 
export function BAManageList(data,query) {
  return request({
    url: '/bussiness/Apply/policeAreaManageList',
    method: 'post',
    params: query,
    data: data,
    isEncrypt: false
  })
}
// 自侦办案区管理列表   /dev-api/bussiness/Apply/policeAreaManageList 
export function ZZManageList(data,query) {
  return request({
    url: '/bussiness/Apply/policeAreaManageList',
    method: 'post',
    params: query,
    data: data,
    isEncrypt: false
  })
}
// 指定居所管理列表   /dev-api/bussiness/Apply/policeAreaManageList 
export function ZJManageList(data,query) {
  return request({
    url: '/bussiness/Apply/policeAreaManageList',
    method: 'post',
    params: query,
    data: data,
    isEncrypt: false
  })
}



//// 办案中心管理列表下面的房间信息 /dev-api/bussiness/Apply/roomStateList
export function roomStateList(query) {
  return request({
    url: '/bussiness/Apply/roomStateList?unitId=' + query.unitId + '&policeAreaType=' + query.policeAreaType,
    method: 'post',
    // params: query,
    isEncrypt: false
  })
}


// 办案中心管理列表--取消  /bussiness/ApplyDetail/cancel
export function ApplyDetailCancel(id) {
  return request({
    url: '/bussiness/ApplyDetail/cancel?jwApplyDetailId=' + id,
    method: 'post',
    isEncrypt: false
  })
}